import styles from "./style.module.css";
import clsx from "clsx";
const RadioGroup = ({ value, onChange, actions }) => {
  return (
    <div className="flex gap-x-[20px] text-center leading-[56px]">
      {actions?.map((it) => (
        <span
          className={clsx(styles.radio, {
            [styles.active]: it.value === value,
          })}
          onClick={() => onChange(it.value)}
          key={it.value}
        >
          {it.label}
        </span>
      ))}
    </div>
  );
};

export default RadioGroup;
